package com.ayz.gateway.api.server;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.52.1)",
    comments = "Source: gateway_subscriberGatewayService.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class SubscribeGatewayGroupServiceGrpc {

  private SubscribeGatewayGroupServiceGrpc() {}

  public static final String SERVICE_NAME = "SubscribeGatewayGroupService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<com.ayz.gateway.api.request.GatewayServiceSubscriber.SubscribeGatewayGroupRequest,
      com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> getSubscribeGatewayGroupMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "subscribeGatewayGroup",
      requestType = com.ayz.gateway.api.request.GatewayServiceSubscriber.SubscribeGatewayGroupRequest.class,
      responseType = com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor<com.ayz.gateway.api.request.GatewayServiceSubscriber.SubscribeGatewayGroupRequest,
      com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> getSubscribeGatewayGroupMethod() {
    io.grpc.MethodDescriptor<com.ayz.gateway.api.request.GatewayServiceSubscriber.SubscribeGatewayGroupRequest, com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> getSubscribeGatewayGroupMethod;
    if ((getSubscribeGatewayGroupMethod = SubscribeGatewayGroupServiceGrpc.getSubscribeGatewayGroupMethod) == null) {
      synchronized (SubscribeGatewayGroupServiceGrpc.class) {
        if ((getSubscribeGatewayGroupMethod = SubscribeGatewayGroupServiceGrpc.getSubscribeGatewayGroupMethod) == null) {
          SubscribeGatewayGroupServiceGrpc.getSubscribeGatewayGroupMethod = getSubscribeGatewayGroupMethod =
              io.grpc.MethodDescriptor.<com.ayz.gateway.api.request.GatewayServiceSubscriber.SubscribeGatewayGroupRequest, com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "subscribeGatewayGroup"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.ayz.gateway.api.request.GatewayServiceSubscriber.SubscribeGatewayGroupRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult.getDefaultInstance()))
              .setSchemaDescriptor(new SubscribeGatewayGroupServiceMethodDescriptorSupplier("subscribeGatewayGroup"))
              .build();
        }
      }
    }
    return getSubscribeGatewayGroupMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static SubscribeGatewayGroupServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SubscribeGatewayGroupServiceStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SubscribeGatewayGroupServiceStub>() {
        @Override
        public SubscribeGatewayGroupServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SubscribeGatewayGroupServiceStub(channel, callOptions);
        }
      };
    return SubscribeGatewayGroupServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static SubscribeGatewayGroupServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SubscribeGatewayGroupServiceBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SubscribeGatewayGroupServiceBlockingStub>() {
        @Override
        public SubscribeGatewayGroupServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SubscribeGatewayGroupServiceBlockingStub(channel, callOptions);
        }
      };
    return SubscribeGatewayGroupServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static SubscribeGatewayGroupServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SubscribeGatewayGroupServiceFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SubscribeGatewayGroupServiceFutureStub>() {
        @Override
        public SubscribeGatewayGroupServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SubscribeGatewayGroupServiceFutureStub(channel, callOptions);
        }
      };
    return SubscribeGatewayGroupServiceFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class SubscribeGatewayGroupServiceImplBase implements io.grpc.BindableService {

    /**
     * <pre>
     **
     *服务端推送
     * </pre>
     */
    public void subscribeGatewayGroup(com.ayz.gateway.api.request.GatewayServiceSubscriber.SubscribeGatewayGroupRequest request,
        io.grpc.stub.StreamObserver<com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSubscribeGatewayGroupMethod(), responseObserver);
    }

    @Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getSubscribeGatewayGroupMethod(),
            io.grpc.stub.ServerCalls.asyncServerStreamingCall(
              new MethodHandlers<
                com.ayz.gateway.api.request.GatewayServiceSubscriber.SubscribeGatewayGroupRequest,
                com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult>(
                  this, METHODID_SUBSCRIBE_GATEWAY_GROUP)))
          .build();
    }
  }

  /**
   */
  public static final class SubscribeGatewayGroupServiceStub extends io.grpc.stub.AbstractAsyncStub<SubscribeGatewayGroupServiceStub> {
    private SubscribeGatewayGroupServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @Override
    protected SubscribeGatewayGroupServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SubscribeGatewayGroupServiceStub(channel, callOptions);
    }

    /**
     * <pre>
     **
     *服务端推送
     * </pre>
     */
    public void subscribeGatewayGroup(com.ayz.gateway.api.request.GatewayServiceSubscriber.SubscribeGatewayGroupRequest request,
        io.grpc.stub.StreamObserver<com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> responseObserver) {
      io.grpc.stub.ClientCalls.asyncServerStreamingCall(
          getChannel().newCall(getSubscribeGatewayGroupMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class SubscribeGatewayGroupServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<SubscribeGatewayGroupServiceBlockingStub> {
    private SubscribeGatewayGroupServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @Override
    protected SubscribeGatewayGroupServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SubscribeGatewayGroupServiceBlockingStub(channel, callOptions);
    }

    /**
     * <pre>
     **
     *服务端推送
     * </pre>
     */
    public java.util.Iterator<com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult> subscribeGatewayGroup(
        com.ayz.gateway.api.request.GatewayServiceSubscriber.SubscribeGatewayGroupRequest request) {
      return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
          getChannel(), getSubscribeGatewayGroupMethod(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class SubscribeGatewayGroupServiceFutureStub extends io.grpc.stub.AbstractFutureStub<SubscribeGatewayGroupServiceFutureStub> {
    private SubscribeGatewayGroupServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @Override
    protected SubscribeGatewayGroupServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SubscribeGatewayGroupServiceFutureStub(channel, callOptions);
    }
  }

  private static final int METHODID_SUBSCRIBE_GATEWAY_GROUP = 0;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final SubscribeGatewayGroupServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(SubscribeGatewayGroupServiceImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @Override
    @SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_SUBSCRIBE_GATEWAY_GROUP:
          serviceImpl.subscribeGatewayGroup((com.ayz.gateway.api.request.GatewayServiceSubscriber.SubscribeGatewayGroupRequest) request,
              (io.grpc.stub.StreamObserver<com.ayz.gateway.api.response.GatewayCommonResult.GatewayResult>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @Override
    @SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class SubscribeGatewayGroupServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    SubscribeGatewayGroupServiceBaseDescriptorSupplier() {}

    @Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return com.ayz.gateway.api.request.GatewayServiceSubscriber.getDescriptor();
    }

    @Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("SubscribeGatewayGroupService");
    }
  }

  private static final class SubscribeGatewayGroupServiceFileDescriptorSupplier
      extends SubscribeGatewayGroupServiceBaseDescriptorSupplier {
    SubscribeGatewayGroupServiceFileDescriptorSupplier() {}
  }

  private static final class SubscribeGatewayGroupServiceMethodDescriptorSupplier
      extends SubscribeGatewayGroupServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    SubscribeGatewayGroupServiceMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (SubscribeGatewayGroupServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new SubscribeGatewayGroupServiceFileDescriptorSupplier())
              .addMethod(getSubscribeGatewayGroupMethod())
              .build();
        }
      }
    }
    return result;
  }
}
